// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_c;

import java.util.Hashtable;

// Referenced classes of package com.nnee.c:
//            c

class cls_g
{

    public cls_g(int i1, char ac[], int j1, int k1, boolean flag)
    {
        q = null;
        r = 0;
        s = false;
        o = i1;
        r = k1 - j1;
        p = new String(ac, j1, r);
        a(flag);
    }

    private int a(char ac[], int i1, char c1, int j1)
    {
    	int i2 = 0;
        int k1;
        int l1;
        k1 = i1 + j1;
        if(k1 > ac.length)
            k1 = ac.length;
        l1 = i1;
 
	while(true)
	{
        if(l1 >= k1)
        {
        	 i2 = -1;
            break  ;
        }
        if(ac[l1] != c1) {
        	l1++;
            
        } else {
        	i2 = 1 + (l1 - i1);
        }
	}
        return i2;
 
    }

    private String a(String s1, boolean flag)
    {
        char ac[];
        int i1;
        StringBuffer stringbuffer1;
        boolean flag1;
        ac = s1.toCharArray();
        StringBuffer stringbuffer = new StringBuffer(ac.length);
        i1 = 0;
        stringbuffer1 = stringbuffer;
        flag1 = false;
 
	
	while(true)
	{
        char c1;
        String s4;
        if(i1 >= ac.length)
            return com.nnee.p_c.cls_c.b(stringbuffer1.toString());
        c1 = ac[i1];
        char c2;
        if(i1 + 1 < ac.length)
            c2 = ac[i1 + 1];
        else
            c2 = '\0';
        if(c1 == ' ')
        {
            if(flag || !flag1)
                stringbuffer1 = stringbuffer1.append(' ');
            flag1 = true;
            i1++;
            continue; /* Loop/switch isn't completed */
        }
        if(c1 == '\r' && c2 == '\n')
        {
            if(flag)
                stringbuffer1 = stringbuffer1.append('\n');
            i1 += 2;
            continue; /* Loop/switch isn't completed */
        }
        if(c1 == '\n' || c1 == '\r')
        {
            if(flag)
                stringbuffer1 = stringbuffer1.append('\n');
            i1++;
            continue; /* Loop/switch isn't completed */
        }
        if(c1 != '&')
            break  ;
        int j1 = a(ac, i1, ';', 10);
        if(j1 == -1)
        {
            stringbuffer1 = stringbuffer1.append('&');
            i1++;
            flag1 = false;
            continue; /* Loop/switch isn't completed */
        }
        String s2 = new String(ac, i1, j1);
        String s3 = (String)n.get(s2);
        if(s3 != null)
        {
            stringbuffer1 = stringbuffer1.append(s3);
            i1 += j1;
            flag1 = false;
            continue; /* Loop/switch isn't completed */
        }
        if(c2 != '#')
            break  ;
        s4 = new String(ac, i1 + 2, j1 + -3);
        StringBuffer stringbuffer2;
        int k1 = Integer.parseInt(s4);
        if(k1 <= 0 || k1 >= 0x10000)
            break  ;
        stringbuffer2 = stringbuffer1.append((char)k1);
        stringbuffer1 = stringbuffer2;
//        i1++;
//        flag1 = false;
//         
//        i1 += 2;
//        flag1 = false;
//        continue; /* Loop/switch isn't completed */
//        stringbuffer1 = stringbuffer1.append('&');
//        i1++;
//        flag1 = false;
//        continue; /* Loop/switch isn't completed */
//        stringbuffer1 = stringbuffer1.append(c1);
//        i1++;
//        flag1 = false;
//        if(true) goto _L2; else goto _L1
		}
	
	return stringbuffer1.toString();
    }

    private void a(boolean flag)
    {
        if(o != 2) {
        	if(o == 0)
                q = a(p, flag);
        	
        } else {
        	char ac[] = p.toCharArray();
            if(!a(f, ac) && !a(g, ac)) {
            	if(a(h, ac))
                    q = "\n* ";
                else
                if(a(i, ac))
                    s = true;
                else
                if(a(j, ac))
                    q = "\n--------\n";
                else
                if(b(k, ac))
                    q = "\t";
                else
                if(b(l, ac) || b(m, ac))
                    q = "\n";
            } else {
            	q = "\n";
            }
        }
        
        return;
 
    }

    private boolean a(char ac[], char ac1[])
    {
        boolean flag = false;
        if(ac.length < ac1.length) {
        	for(int i1 = ((flag) ? 1 : 0); i1 < ac.length; i1++)
                if(Character.toLowerCase(ac1[i1]) != ac[i1])
                    continue; /* Loop/switch isn't completed */

            if(ac1.length > ac.length)
            {
                char c1 = Character.toLowerCase(ac1[ac.length]);
                if(c1 < 'a' || c1 > 'z')
                    flag = true;
            } else
            {
                flag = true;
            }
           
        }
 
        return flag;
 
    }

    private boolean b(char ac[], char ac1[])
    {
        boolean flag = false;
        if(ac.length <= ac1.length) {
        	 for(int i1 = ((flag) ? 1 : 0); i1 < ac.length; i1++)
                 if(Character.toLowerCase(ac1[i1]) != ac[i1])
                     continue; /* Loop/switch isn't completed */

             flag = true;
        }
 
        return flag;
 
    }

    public int a()
    {
        return r;
    }

    public boolean b()
    {
        return s;
    }

    public String c()
    {
        String s1;
        if(q == null)
            s1 = "";
        else
            s1 = q;
        return s1;
    }

    public String toString()
    {
        return p;
    }

    public static final int a = 0;
    public static final int b = 1;
    public static final int c = 2;
    public static final int d = 3;
    public static final int e = 4;
    private static final char f[] = "<br".toCharArray();
    private static final char g[] = "<p".toCharArray();
    private static final char h[] = "<li".toCharArray();
    private static final char i[] = "<pre".toCharArray();
    private static final char j[] = "<hr".toCharArray();
    private static final char k[] = "</td>".toCharArray();
    private static final char l[] = "</tr>".toCharArray();
    private static final char m[] = "</li>".toCharArray();
    private static final Hashtable n;
    private int o;
    private String p;
    private String q;
    private int r;
    private boolean s;

    static 
    {
        n = new Hashtable();
        n.put("<", "<");
        n.put(">", ">");
        n.put("&", "&");
        n.put("?", "(r)");
        n.put("?", "(c)");
        n.put(" ", " ");
        n.put("\uFFE1", "?");
    }
}
